﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Avatar.Person;
using Avatar.Common;
using Avatar.MembershipService;
using AvatarHelper;

public partial class PersonInterview : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var _user = LoginManager.GetCurrentUser();
            if (_user != null)
            {
                using(var _adc=DBHelper.GetDataContext())
                {
                var _interViews = _adc.InterViewRecord.Where(i=>i.ResumeID==_user.UserName);
                ListView1.DataSource = _interViews;
                ListView1.DataBind();
            }}
        }
    }
    protected void btn_ApplicantSum_Click(object sender, EventArgs e)
    {
        LinkButton _btn = sender as LinkButton;

        Guid _jobID = string.IsNullOrEmpty(_btn.CommandArgument) ? Guid.Empty : new Guid(_btn.CommandArgument);

        int _applicant = JobApplicationRecordManager.ApplicantNumber(_jobID);

        Helper.ShowMassage("此职位当前共有申请者: " + _applicant.ToString() + " 人", Request.Url.ToString());
    }
    protected void btn_ViewNotice_Click(object sender, EventArgs e)
    {
        LinkButton _btn = sender as LinkButton;

        Guid _jobID = string.IsNullOrEmpty(_btn.CommandArgument) ? Guid.Empty : new Guid(_btn.CommandArgument);

        int _applicant = JobApplicationRecordManager.ApplicantNumber(_jobID);

        Helper.ShowMassage("此职位当前共有申请者: " + _applicant.ToString() + " 人", Request.Url.ToString());
    }
}
